package base.day24;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

public class MyCharacterStream4 {
    public static void main(String[] args) throws IOException {
        Scanner sc=new Scanner(System.in);
        System.out.println("用户名：");
        String userName=sc.next();
        System.out.println("密码：");
        String password=sc.next();

        FileWriter fw=new FileWriter("E:\\java\\java project\\java-code\\a.txt");
        fw.write("用户名："+userName);
        fw.write("\r\n");
        fw.write("密码："+password);
        fw.close();
    }
}
